{% comment %}
Copyright 2010 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}
{% comment %}
  This is the base template which defines the structure of all pages
  within the person finder application and all common features.
  To override parts of this template, use the 'extends' tag and
  'block' tags to define new content for any blocks defined here.
{% endcomment %}
{% load i18n %}
<!doctype html public "-//W3C//DTD HTML 4.01 Strict//EN">
<html dir="{{env.rtl|yesno:"rtl,ltr"}}">
<head>
  <meta name="keywords" content="{{env.keywords}}">
  <meta http-equiv="content-type" content="text/html; charset={{env.charset}}">
  <meta http-equiv="content-language" content="{{env.lang}}">
  {% if noindex %}
    <meta name="robots" content="noindex">
  {% endif %}
  {% if feed_url %}
    <link rel="alternate" type="application/atom+xml"
      title="{% trans 'Atom feed of updates about this person' %}" href="{{feed_url}}" />
  {% endif %}
  <link rel="alternate" media="handheld" href="{{env.url}}">
  <title>
    {% block title-extra %}{% endblock %}
    {% trans "Google Person Finder" %}: {{env.subdomain_title}}
  </title>
{% block head %}
  {% if params.small %}
    {% comment %}
      Facebook small interface acts the same as the normal small
      interface, it's just a bit smaller.
    {% endcomment %}
    <link type="text/css" rel="stylesheet" href="/static/style-small.css">
    {% ifequal params.style "facebook" %}
    <link type="text/css" rel="stylesheet" href="/static/style-facebook.css">
    {% endifequal %}
    {% if env.rtl %}
    <link type="text/css" rel="stylesheet" href="/static/style-rtl-small.css">
    {% endif %}
  {% else %}
    <link type="text/css" rel="stylesheet" href="/static/style.css">
    {% if env.rtl %}
    <link type="text/css" rel="stylesheet" href="/static/style-rtl.css">
    {% endif %}
    {% if env.language_api_key %}
      <script src="https://www.google.com/jsapi?key={{env.language_api_key}}"></script>
      <script type="text/javascript">
        var lang = "{{env.lang}}";
      </script>
    {% endif %}
    <script src="/static/forms.js"></script>
  {% endif %}
  {% if env.virtual_keyboard_layout %}
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript" src="/static/vk.js"></script>
    <script type="text/javascript">
      google.setOnLoadCallback(function() {
        initialize_keyboard('{{env.virtual_keyboard_layout}}');
      });
    </script>
  {% endif %}
{% endblock %}
{% block head-extra %}{% endblock %}
</head>

{% block body %}
<body onload="{{onload_function}}">
  {% block header %}
    {% if params.small %}
      <h3 class="main_title">
        <a href="{{env.main_url}}">
          {% trans "Person Finder" %}: {{env.subdomain_title}}
        </a>
      </h3>
    {% endif %}
    {% ifnotequal env.language_menu|length 1 %}
      <div class="languages">
        {% for option in env.language_menu %}
          {% if not forloop.first %} | {% endif %}
          {% ifequal option.lang env.lang %}
            <span class="selected">{{option.endonym}}</span>
          {% else %}
            <a href="{{option.url}}">{{option.endonym}}</a>
          {% endifequal %}
        {% endfor %}
      </div>
    {% endifnotequal %}
    {% if not params.small %}
      <h1>
        <a href="{{env.main_url}}">
          {% trans "Person Finder" %}: {{env.subdomain_title}}
        </a>
      </h1>
      <div class="clear"></div>
    {% endif %}
  {% endblock %}

  {% block content %}
  {% endblock %}

  {% block footer %}
    {{params.small|yesno:",<p>"|safe}}
    <div><a href="{{env.main_url}}">
      {{env.back_chevron}} {% trans "Back to start" %}
    </a></div>
  {% endblock %}

  {% block disclaimer %}
    <div class="disclaimer">
    {% trans "PLEASE NOTE: All data entered will be available to the public and viewable and usable by anyone.  Google does not review or verify the accuracy of this data." %}
    </div>
  {% endblock %}

  {% block footer-links %}
    <div class="footer links">
      {% block embed-link %}
      <a href="{{env.embed_url}}"
        {{params.small|yesno:"target=\"_blank\","}}
        >{% trans "Embed this tool on your site" %}</a>
      <span class="link-separator">-</span>
      {% endblock %}
      <a href="http://code.google.com/p/googlepersonfinder/"
        {{params.small|yesno:"target=\"_blank\","}}
        >{% trans "Developers" %}</a>
      <span class="link-separator">-</span>
      <a href="http://www.google.com/accounts/TOS?hl={{env.lang}}"
        target="_blank">{% trans "Terms of Service" %}</a>
    </div>

    {% if params.small %}
      <div><img src="http://person-finder.appspot.com/static/powered-by-google-56x32.gif"/></div>
    {% else %}
      <div class="logo_footer">
        <img src="http://person-finder.appspot.com/static/powered-by-google-120x30.gif"/>
      </div>
    {% endif %}
  {% endblock %}
  {% include "analytics.html" %}
</body>
{% endblock %}
</html>
